Skip to content

Add Pattern Recall puzzle framework and integrate into Perbug gameplay - #384

Open
ercmine wants to merge 2 commits into
mainfrom
codex/implement-perbug-pattern-recall-puzzle-09f80x
Open

Add Pattern Recall puzzle framework and integrate into Perbug gameplay#384
ercmine wants to merge 2 commits into
mainfrom
codex/implement-perbug-pattern-recall-puzzle-09f80x

Conversation

@ercmine

@ercmine ercmine commented Mar 27, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Provide a deterministic, node-seeded puzzle subsystem to enable location-tied micro-puzzles for nodes and attach rewards/telemetry to them.
  • Introduce an interactive Pattern Recall puzzle as the first puzzle type with preview/recall lifecycle and tolerance-based validation.

Description

  • Add a lightweight puzzle framework in puzzles/perbug_puzzle_framework.dart with seed handling, deterministic RNG (seededRandom), difficulty/result types, lifecycle events, and generator/validator abstractions.
  • Implement Pattern Recall components including pattern_recall_generator.dart, pattern_recall_models.dart, and pattern_recall_validator.dart to produce deterministic sequences, difficulty knobs, distractions, and validation logic.
  • Integrate puzzle state and lifecycle into the Perbug game by extending PerbugGameState and adding methods to PerbugGameController to launch, start preview, step preview, complete preview, input symbols, retry, abandon, and close pattern sessions, and emit puzzleEvents and lifecycle entries.
  • Add UI sheet pattern_recall_puzzle_sheet.dart and wire a Launch Pattern Recall button in perbug_game_page.dart to present and interact with the puzzle from the Perbug UI.

Testing

  • Added unit tests in app/test/perbug_pattern_recall_test.dart that exercise deterministic generation, node uniqueness, difficulty tuning, validator tolerance, controller lifecycle and input blocking, and reuse of in-progress sessions; the file contains 6 tests run via flutter test.
  • All tests in perbug_pattern_recall_test.dart passed successfully.

Codex Task

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant